package mx.netbrain.model;

// Generated Sep 26, 2012 10:26:19 PM by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Status generated by hbm2java
 */
@Entity
@Table(name = "status", catalog = "netbrain", uniqueConstraints = @UniqueConstraint(columnNames = "status"))
public class Status implements java.io.Serializable {

	private Integer id;
	private String status;
	private Set<Storage> storages = new HashSet<Storage>(0);
	private Set<User> users = new HashSet<User>(0);

	public Status() {
	}

	public Status(String status) {
		this.status = status;
	}

	public Status(String status, Set<Storage> storages, Set<User> users) {
		this.status = status;
		this.storages = storages;
		this.users = users;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "status", unique = true, nullable = false, length = 10)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "status")
	public Set<Storage> getStorages() {
		return this.storages;
	}

	public void setStorages(Set<Storage> storages) {
		this.storages = storages;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "status")
	public Set<User> getUsers() {
		return this.users;
	}

	public void setUsers(Set<User> users) {
		this.users = users;
	}

}
